WebVPN (web-based Virtual Private Network) is a remote-access solution that uses the SSL (Secure Sockets Layer) layer of the browser to secure communications between a client PC and a head-end gateway. WebVPN enables users to gain a highly secure connection from any browser-based device, such as a PC located at a client's premises. In this approach, the gateway acts as a proxy for the internal web pages that the client wishes to view. The gateway modifies the HTML (Hyper-Text Markup Language) pages so that all sub-sequent URLs (Universal Resource Locators) embedded in the page are directed to pass through the gateway. This process of page modification is known as content transformation and also as HTML mangling. The problem becomes more difficult when a page contains embedded Java applets. This is because the applet could have been hard-coded to access an internal URL directly. In order for the applet to work effectively in the WebVPN scenario, its hard-coded internal URL's need to be transformed (mangled) to pass though the gateway.